#include <climits>
#include <iostream>
#include <string>
#include <unordered_map>
using namespace std;

void deleteMinAppearance(string &str) {
	unordered_map<char, int> map;
	int min = INT_MAX;
	for (auto &ch : str) {
		map[ch]++;
	}
	for (auto &it : map)
		if (it.second <= min)
			min = it.second;
	for (auto it = str.begin(); it != str.end(); ) {
		if (map[*it] == min) {
			it = str.erase(it);
		}
		else ++it;
	}
	cout << str << endl;
}

int main() {
	string str;
	cin >> str;
	deleteMinAppearance(str);
}